package com.agh.portal.security;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;

import com.agh.portal.domain.Student;

public class EnchancedUserDetails extends org.springframework.security.core.userdetails.User{
	
	private static final long serialVersionUID = 1L;
	private Student student;
	
	public EnchancedUserDetails(
			Student student,
			String email,
			String password,
			boolean enabled,
			boolean accountNonExpired,
			boolean credentialsNonExpired,
			boolean accountNonLocked,
			Collection<? extends GrantedAuthority> authorities) {
		super(email, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
		this.student = student;
	}

	public Long getId() {
		return student.getId();
	}

	public String getStudentName() {
		return student.getName();
	}

	public String getStudentSurname() {
		return student.getSurname();
	}
	
	public String getStudentAvatarId(){
		return student.getAvatarId();
	}


}
